﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace QuanLyThuNgan
{
    public class DMInCaThuNganDAO
    {
        public bool m_Insert(DMInCaThuNganDTO _info)
        {
            string _sql = string.Format("usp_ThuNgan_DMInCaThuNgan_Insert {0},'{1}',{2},'{3}',{4},{5},{6}", _info.IIDCaThuNgan, _info.DaNgayGioIn, _info.IIDNguoiIn, _info.ScHost, _info.ITongSoTien, _info.ITienDaXacNhan, _info.ITienChuaXacNhan);
            return Uit.it_SQL.ExecuteNonQuery(_sql, false);
        }
        public bool m_Update(DMInCaThuNganDTO _info)
        {
            string _sql = string.Format("usp_ThuNgan_DMInCaThuNgan_Update {0},{1},'{2}',{3},'{4}',{5},{6},{7}", _info.IIDInCaThuNgan, _info.IIDCaThuNgan, _info.DaNgayGioIn, _info.IIDNguoiIn, _info.ScHost, _info.ITongSoTien, _info.ITienDaXacNhan, _info.ITienChuaXacNhan);
            return Uit.it_SQL.ExecuteNonQuery(_sql, false);
        }
        public bool m_Delete(DMInCaThuNganDTO _info)
        {
            string _sql = string.Format("usp_ThuNgan_DMInCaThuNgan_Delete{0}", _info.IIDInCaThuNgan);
            return Uit.it_SQL.ExecuteNonQuery(_sql, false);
        }

        public DataTable m_SelectAllInCaThuNgan()
        {
            string _sql = string.Format("usp_ThuNgan_DMInCaThuNgan_SelectAll  ");
            return Uit.it_SQL.getDataTable(_sql, null, "");
        }
    }
}
